function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }

function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }

import { Button } from 'antd';
import dayjs from 'dayjs';
import React from 'react';
export default [{
  type: 'INPUT',
  label: '节点名称',
  name: 'name',
  inputProps: {
    allowClear: true,
    placeholder: '请输节点名称',
    className: 'search-input'
  }
}, {
  label: '使用时长',
  value: '',
  props: 'time',
  type: 'SELECT',
  inputProps: {
    options: [{
      label: '1周',
      value: '1week'
    }, {
      label: '1月',
      value: '1month'
    }, {
      label: '1年',
      value: '1year'
    }],
    style: {
      width: '100%'
    }
  },
  rules: [{
    required: true,
    message: '请选择使用时长'
  }]
}, {
  type: '负责人',
  label: '',
  name: 'ownerId',
  inputProps: {
    allowClear: true,
    remote: function () {
      var _remote = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(val) {
        return regeneratorRuntime.wrap(function _callee$(_context) {
          while (1) switch (_context.prev = _context.next) {
            case 0:
              if (val) {
                _context.next = 2;
                break;
              }

              return _context.abrupt("return", []);

            case 2:
              return _context.abrupt("return", [{
                label: val,
                value: val
              }, {
                label: `${val}1`,
                value: `${val}1`
              }, {
                label: `${val}2`,
                value: `${val}2`
              }, {
                label: `${val}3`,
                value: `${val}3`
              }]);

            case 3:
            case "end":
              return _context.stop();
          }
        }, _callee);
      }));

      function remote(_x) {
        return _remote.apply(this, arguments);
      }

      return remote;
    }(),
    className: 'search-ownerId',
    placeholder: '请输入负责人ID'
  }
}, {
  type: 'DATERANGER',
  label: '使用时间',
  name: 'createTm',
  inputProps: {
    allowClear: true,
    disabledDate: current => {
      return current && current > dayjs().endOf('day');
    },
    renderExtraFooter: () => {
      return /*#__PURE__*/React.createElement("div", {
        style: {
          padding: 10
        }
      }, /*#__PURE__*/React.createElement(Button, {
        style: {
          marginRight: 10
        },
        type: "primary"
      }, "\u6700\u8FD1\u4E00\u5468"), /*#__PURE__*/React.createElement(Button, {
        style: {
          marginRight: 10
        },
        type: "primary"
      }, "\u6700\u8FD1\u4E00\u6708"), /*#__PURE__*/React.createElement(Button, {
        style: {
          marginRight: 10
        },
        type: "primary"
      }, "\u6700\u8FD1\u4E00\u5E74"));
    }
  }
}];